doubleMe x = x + x
boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x]
boomBangs1 xs = [ x | x <- xs, odd x]

lucky :: (Integral a) => a -> String 
lucky 7 = "LUCKY NUMBER SEVEN!" 
lucky x = "Sorry, you're out of luck, pal!"

sayMe :: (Integral a) => a -> String 
sayMe 1 = "One!" 
sayMe 2 = "Two!" 
sayMe 3 = "Three!" 
sayMe 4 = "Four!" 
sayMe 5 = "Five!" 
sayMe x = "Not between 1 and 5" 

addVectors1 :: (Num a) => (a, a) -> (a, a) -> (a, a)
addVectors1 a b = (fst a + fst b, snd a + snd b)

addVectors2 :: (Num a) => (a, a) -> (a, a) -> (a, a)
addVectors2 (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)


sum' :: (Num a) => [a] -> a
sum' xs = foldl (\acc x -> acc + x) 0 xs


















